<div style="font-weight: bold;margin-left:15px;">checkgd2.php</div><link rel="stylesheet" href="../phphl.css" type="text/css"><div class="hl-main"><table class="hl-table" width="100%"><tr><td class="hl-gutter" align="right" valign="top"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="hl-main" valign="top"><pre><span class="hl-inlinetags">&lt;?php</span><span class="hl-code"> </span><span class="hl-comment">//</span><span class="hl-comment"> content=&quot;text/plain; charset=utf-8&quot;</span><span class="hl-comment"></span><span class="hl-code">
</span><span class="hl-var">$im</span><span class="hl-code"> =  </span><span class="hl-identifier">imagecreatetruecolor</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-code"> </span><span class="hl-number">300</span><span class="hl-code">, </span><span class="hl-number">200</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$black</span><span class="hl-code"> = </span><span class="hl-identifier">imagecolorallocate</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-var">$im</span><span class="hl-code">,  </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-code">, </span><span class="hl-number">0</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$lightgray</span><span class="hl-code"> = </span><span class="hl-identifier">imagecolorallocate</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-var">$im</span><span class="hl-code">,  </span><span class="hl-number">230</span><span class="hl-code">, </span><span class="hl-number">230</span><span class="hl-code">, </span><span class="hl-number">230</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$darkgreen</span><span class="hl-code"> = </span><span class="hl-identifier">imagecolorallocate</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-var">$im</span><span class="hl-code">,  </span><span class="hl-number">80</span><span class="hl-code">, </span><span class="hl-number">140</span><span class="hl-code">, </span><span class="hl-number">80</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-var">$white</span><span class="hl-code"> = </span><span class="hl-identifier">imagecolorallocate</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-var">$im</span><span class="hl-code">,  </span><span class="hl-number">255</span><span class="hl-code">, </span><span class="hl-number">255</span><span class="hl-code">, </span><span class="hl-number">255</span><span class="hl-brackets">)</span><span class="hl-code">;
 
</span><span class="hl-identifier">imagefilledrectangle</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-var">$im</span><span class="hl-code">,</span><span class="hl-number">0</span><span class="hl-code">,</span><span class="hl-number">0</span><span class="hl-code">,</span><span class="hl-number">299</span><span class="hl-code">,</span><span class="hl-number">199</span><span class="hl-code"> ,</span><span class="hl-var">$lightgray</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">imagerectangle</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-var">$im</span><span class="hl-code">,</span><span class="hl-number">0</span><span class="hl-code">,</span><span class="hl-number">0</span><span class="hl-code">,</span><span class="hl-number">299</span><span class="hl-code">,</span><span class="hl-number">199</span><span class="hl-code">,</span><span class="hl-var">$black</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">imagefilledellipse</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-var">$im</span><span class="hl-code">,</span><span class="hl-number">150</span><span class="hl-code">,</span><span class="hl-number">100</span><span class="hl-code">,</span><span class="hl-number">210</span><span class="hl-code">,</span><span class="hl-number">110</span><span class="hl-code">,</span><span class="hl-var">$white</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">imagefilledellipse</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-var">$im</span><span class="hl-code">,</span><span class="hl-number">150</span><span class="hl-code">,</span><span class="hl-number">100</span><span class="hl-code">,</span><span class="hl-number">200</span><span class="hl-code">,</span><span class="hl-number">100</span><span class="hl-code">,</span><span class="hl-var">$darkgreen</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">header</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">Content-type: image/png</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-identifier">imagepng</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-var">$im</span><span class="hl-brackets">)</span><span class="hl-code">;
</span><span class="hl-inlinetags">?&gt;</span></pre></td></tr></table></div>
